home *** CD-ROM | disk | FTP | other *** search
/ PC Gamer (Italian) 45 / PC Gamer IT CD 45 2-2.iso / addons / photodraw / NT4SP4 / SP4I386.EXE / iimltils.asp < prev    next >
Encoding:
Text File  |  1998-10-15  |  8.2 KB  |  242 lines

  1. <%@ LANGUAGE=VBScript %>
  2. <% Option Explicit %>
  3. <% Response.Expires = 0 %>
  4.  
  5. <% 
  6. Const L_BROWSE_TEXT="Browse"
  7. Const L_FILE_TEXT="File"
  8. Const L_URL_TEXT="URL"
  9. Const L_ALLUNASSIGNED_TEXT="All Unassigned"
  10. Const L_NA_TEXT="N/A"
  11. Const L_SECURE_TEXT="Secure Bindings"
  12. Const L_SERVER_TEXT="Server Bindings"
  13. %>
  14.  
  15. <HTML>
  16. <HEAD>
  17.     <TITLE></TITLE>
  18.  
  19.     <SCRIPT LANGUAGE="JavaScript">
  20.         function chgStatus(indexnum){
  21.             parent.head.document.hiddenform.index.value=indexnum
  22.             self.location.href="iimltils.asp"
  23.             
  24.         }
  25.  
  26.     function SetUpdated(){
  27.         if (parent.head.listFunc.noupdate){
  28.             parent.head.listFunc.noupdate = false;
  29.         }
  30.         else{
  31.             if (parent.head.document.hiddenform.index.value != -1){
  32.             if (parent.head.document.hiddenform != null){        
  33.                 i=parent.head.document.hiddenform.index.value
  34.                 reSort = setVals(parent.head.cachedList[i],"ipaddress",document.listform.editMe);
  35.                 reSort = reSort || setVals(parent.head.cachedList[i],"ipport",document.listform.ipport);
  36.                 reSort = reSort || setVals(parent.head.cachedList[i],"sslport",document.listform.sslport);
  37.                 reSort = reSort || setVals(parent.head.cachedList[i],"host",document.listform.host);
  38.                 
  39.                 parent.head.cachedList[i].updated=true;
  40.                 if (reSort){
  41.                     parent.head.listFunc.reSort();
  42.                 }
  43.             }
  44.         }
  45.         }
  46.     }
  47.     
  48.     
  49.     function setVals(cachedItem, propName, formCntrl){
  50.         if (cachedItem[propName] != formCntrl.value){
  51.             cachedItem[propName] = formCntrl.value;
  52.             return (parent.head.listFunc.sortby == propName);
  53.         }        
  54.         else{
  55.             return false;
  56.         }
  57.     }
  58.     function SetSecure(item,formCntrl,isSecure)
  59.     {
  60.         if (formCntrl.value != "")
  61.         {
  62.             parent.head.cachedList[item].isSecure = isSecure;
  63.         }
  64.     }
  65.     
  66.     </SCRIPT>
  67. </HEAD>
  68.  
  69. <BODY BGCOLOR="#FFFFFF" LEFTMARGIN=0 TOPMARGIN=0>
  70.  
  71. <FORM NAME="listform">
  72.  
  73. <SCRIPT LANGUAGE="JavaScript">
  74.  
  75.     editOK=false;
  76.     writeSecHdr = true;
  77.     writeHdr = true;    
  78.     sel=eval(parent.head.document.hiddenform.index.value);    
  79.     list = writeList();
  80.     writeLine(list);
  81.  
  82. function writeList(){    
  83.     <% if Session("IsIE") then %>
  84.     <% if Session("FONTSIZE") = "LARGE" then %>
  85.         writestr = "<TABLE WIDTH=470 BORDER=0 CELLPADDING=2 CELLSPACING=0>";
  86.     <% else %>
  87.         writestr = "<TABLE BORDER=0 CELLPADDING=2 CELLSPACING=0>";    
  88.     <% end if %>
  89.     <% else %>
  90.     <% if Session("FONTSIZE") = "LARGE" then %>
  91.         writestr = "<TABLE WIDTH=475 BORDER=0 CELLPADDING=2 CELLSPACING=0>";
  92.     <% else %>
  93.         writestr = "<TABLE WIDTH=344 BORDER=0 CELLPADDING=2 CELLSPACING=0>";
  94.     <% end if %>
  95.     <% end if %>    
  96.     
  97.  
  98.     for (var i=0;i < parent.head.cachedList.length; i++) {
  99.     
  100.         if (parent.head.cachedList[i].sslport != ""){
  101.             if (writeSecHdr){
  102.                 writestr += "<TR>"
  103.                 writestr += writeCol(4,150," ");
  104.                 writestr += "</TR>";                    
  105.                 writestr += "<TR BGCOLOR=#CCCCCC>"
  106.                 writestr += writeCol(4,150,"<B><%= L_SECURE_TEXT %></B>");
  107.                 writestr += "</TR>";
  108.                 writeSecHdr = false;
  109.             }
  110.         }
  111.         else{
  112.             if (writeHdr){        
  113.                 writestr += "<TR BGCOLOR=#CCCCCC>"
  114.                 writestr += writeCol(4,150,"<B><%= L_SERVER_TEXT %></B>");
  115.                 writestr += "</TR>";
  116.                 writeHdr = false;
  117.             }            
  118.         }
  119.  
  120.  
  121.         if (parent.head.document.hiddenform.index.value !=i) {
  122.             if (parent.head.cachedList[i].deleted){
  123.             }
  124.             else{
  125.             
  126.                 <% if Session("IsIE") then %>
  127.                     <% if Session("FONTSIZE") = "LARGE" then %>
  128.                         writestr += "<TR>"
  129.                         writestr += writeCol(1,150,"<A HREF='javascript:chgStatus("+i+");'>" + displayVal(parent.head.cachedList[i].ipaddress,"<%= L_ALLUNASSIGNED_TEXT %>") + "</A>");
  130.                         writestr += writeCol(1,65,displayVal(parent.head.cachedList[i].ipport,"<%= L_NA_TEXT %>"));
  131.                         writestr += writeCol(1,65,displayVal(parent.head.cachedList[i].sslport,"<%= L_NA_TEXT %>"));                    
  132.                         writestr += writeCol(1,190,parent.head.cachedList[i].host);
  133.                         writestr += "</TR>";
  134.                     <% else %>
  135.                     
  136.                         writestr += "<TR>"
  137.                         writestr += writeCol(1,110,"<A HREF='javascript:chgStatus("+i+");'>" + displayVal(parent.head.cachedList[i].ipaddress,"<%= L_ALLUNASSIGNED_TEXT %>") + "</A>");
  138.                         writestr += writeCol(1,50,displayVal(parent.head.cachedList[i].ipport,"<%= L_NA_TEXT %>"));
  139.                         writestr += writeCol(1,50,displayVal(parent.head.cachedList[i].sslport,"<%= L_NA_TEXT %>"));                    
  140.                         writestr += writeCol(1,140,parent.head.cachedList[i].host);
  141.                         writestr += "</TR>";
  142.                 
  143.                     <% end if %>
  144.                 <% else %>
  145.                     <% if Session("FONTSIZE") = "LARGE" then %>
  146.                         writestr += "<TR>"
  147.                         writestr += writeCol(1,150,"<A HREF='javascript:chgStatus("+i+");'>" + displayVal(parent.head.cachedList[i].ipaddress,"<%= L_ALLUNASSIGNED_TEXT %>") + "</A>");
  148.                         writestr += writeCol(1,60,parent.head.cachedList[i].ipport);
  149.                         writestr += writeCol(1,60,displayVal(parent.head.cachedList[i].sslport,"N/A"));                    
  150.                         writestr += writeCol(1,195,parent.head.cachedList[i].host);
  151.                         writestr += "</TR>";
  152.                     <% else %>
  153.                         writestr += "<TR>"
  154.                         writestr += writeCol(1,116,"<A HREF='javascript:chgStatus("+i+");'>" + displayVal(parent.head.cachedList[i].ipaddress,"<%= L_ALLUNASSIGNED_TEXT %>") + "</A>");
  155.                         writestr += writeCol(1,43,parent.head.cachedList[i].ipport);
  156.                         writestr += writeCol(1,47,displayVal(parent.head.cachedList[i].sslport,"N/A"));                    
  157.                         writestr += writeCol(1,148,parent.head.cachedList[i].host);
  158.                         writestr += "</TR>";
  159.                     <% end if %>
  160.                 <% end if %>
  161.             }
  162.         }
  163.         else{
  164.             editOK=true;
  165.             <% if Session("IsIE") then %>
  166.             
  167.                 writestr += "<TR>"
  168.                 writestr += writeCol(1,110,"<INPUT NAME='editMe' VALUE='"+parent.head.cachedList[i].ipaddress +"' SIZE=13 onBlur='SetUpdated();'>");
  169.                 writestr += writeCol(1,40,"<INPUT NAME='ipport' VALUE='"+parent.head.cachedList[i].ipport +"' SIZE=5 onBlur='SetSecure(" + i + ",this,false);SetUpdated();'>");
  170.                 writestr += writeCol(1,40,"<INPUT NAME='sslport' VALUE='"+parent.head.cachedList[i].sslport +"' SIZE=5 onBlur='SetSecure(" + i + ",this,true);SetUpdated();'>");                    
  171.                 writestr += writeCol(1,140,"<INPUT NAME='host' VALUE='"+parent.head.cachedList[i].host +"' SIZE=15 onBlur='SetUpdated();'>");
  172.                 writestr += "</TR>";        
  173.  
  174.             <% else %>
  175.                 <% if Session("FONTSIZE") = "LARGE" then %>
  176.                 
  177.                     writestr += "<TR>"
  178.                     writestr += writeCol(1,150,"<INPUT NAME='editMe' VALUE='"+parent.head.cachedList[i].ipaddress +"' SIZE=13 onBlur='SetUpdated();'>");
  179.                     writestr += writeCol(1,60,"<INPUT NAME='ipport' VALUE='"+parent.head.cachedList[i].ipport +"' SIZE=5 onBlur='SetSecure(" + i + ",this,false);SetUpdated();'>");
  180.                     writestr += writeCol(1,60,"<INPUT NAME='sslport' VALUE='"+parent.head.cachedList[i].sslport +"' SIZE=5 onBlur='SetSecure(" + i + ",this,true);SetUpdated();'>");                    
  181.                     writestr += writeCol(1,195,"<INPUT NAME='host' VALUE='"+parent.head.cachedList[i].host +"' SIZE=25 onBlur='SetUpdated();'>");
  182.                     writestr += "</TR>";
  183.                 
  184.                 <% else %>
  185.                 
  186.                     writestr += "<TR>"
  187.                     writestr += writeCol(1,116,"<INPUT NAME='editMe' VALUE='"+parent.head.cachedList[i].ipaddress +"' SIZE=13 onBlur='SetUpdated();'>");
  188.                     writestr += writeCol(1,43,"<INPUT NAME='ipport' VALUE='"+parent.head.cachedList[i].ipport +"' SIZE=5 onBlur='SetSecure(" + i + ",this,false);SetUpdated();'>");
  189.                     writestr += writeCol(1,47,"<INPUT NAME='sslport' VALUE='"+parent.head.cachedList[i].sslport +"' SIZE=5 onBlur='SetSecure(" + i + ",this,true);SetUpdated();'>");                    
  190.                     writestr += writeCol(1,148,"<INPUT NAME='host' VALUE='"+parent.head.cachedList[i].host +"' SIZE=25 onBlur='SetUpdated();'>");
  191.                     writestr += "</TR>";
  192.  
  193.                 <% end if %>
  194.             <% end if %>
  195.         }
  196.     }
  197.     writestr += "</TABLE>";
  198.     
  199.     return writestr;
  200. }    
  201.     
  202. function displayVal(dispstr, altstr){
  203.     if (dispstr == ""){
  204.         dispstr = altstr;
  205.     }
  206.     return dispstr;
  207. }
  208.  
  209. function writeCol(colspan,w,str){
  210.         var writestr = "<TD";
  211.         if (colspan != ""){
  212.             writestr += " COLSPAN = " + colspan
  213.         }
  214.         if (w != ""){
  215.             writestr += " WIDTH = " + w;
  216.         }        
  217.         <% if Session("IsIE") then %>
  218.                 writestr += " STYLE = 'font-face: Helv; font-size: 8pt;'";
  219.         <% end if %>        
  220.         writestr += "><FONT FACE='Helv,Arial' SIZE=1>" + str + "</FONT></TD>";
  221.  
  222.         return writestr;    
  223. }    
  224.  
  225. function writeLine(str){
  226.     document.write(str);
  227. }
  228. </SCRIPT>
  229.  
  230. <P> 
  231. <P> 
  232. </FORM>
  233. <SCRIPT LANGUAGE="JavaScript">
  234.     if (editOK){
  235.         document.listform.editMe.focus();
  236.         document.listform.editMe.select();
  237.     }
  238. </SCRIPT>
  239. </BODY>
  240. </HTML>
  241.  
  242.